import java.util.Scanner;


//另类相加
public class Add {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int num=sc.nextInt();
        int num1=sc.nextInt();
        while(true)
        {
            int sum=num^num1;
            int carry=(num&num1)<<1;
            if(carry==0)
            {
                System.out.println(sum);
                break;
            }
            num=sum;
            num1=carry;
        }
    }
}
